package com.witdata.common.service.impl;

import com.mybatisflex.core.query.QueryWrapper;
import com.witdata.mysql.base.service.VersionBaseService;
import com.witdata.mysql.domain.entity.TVersion;
import com.witdata.common.service.SystemService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class SystemServiceImpl implements SystemService {
    private final VersionBaseService versionBaseService;

    @Override
    public void check(String version) {
        System.out.println("version = " + version);
        TVersion tVersion = versionBaseService.getOne(new QueryWrapper().orderBy("upload_time", false));
        System.out.println("tVersion = " + tVersion);
    }
}
